package com.wiscamp.ninechapters.problems.math;

/**
 * Latex文本类型枚举
 */
public enum LatexTextEnum {
    GENERAL(1, "通用Latex文本"),

    PLUS_MINUS_EXPRESSION(2, "加减法运算表达式"),

    PLUS_MINUS_EQUATION(3, "加减法运算等式"),

    PLUS_MINUS_INEQUALITY(4, "加减法运算不等式"),

    TIMES_DIVISION_EXPRESSION(5, "乘除法运算表达式"),

    TIMES_DIVISION_EQUATION(6, "乘除法运算等式"),

    TIMES_DIVISION_INEQUALITY(7, "乘除法运算不等式"),

    ARITHMETIC_OPERATIONS_EXPRESSION(8, "算术运算表达式"),

    ARITHMETIC_OPERATIONS_EQUATION(9, "算术运算等式"),

    ARITHMETIC_OPERATIONS_INEQUALITY(10, "算术运算等式"),

    // ARITHMETIC_OPERATIONS_COMPARISON(11, "算术运算比较式"),

    // FRACTION(12,"分数"),

    // RADICAL_NUMBER(13,"根数"),

    // LOOP_DECIMAL(14, "循环小数"),

    //  SCIENCE_NOTATION(15, "科学计数法"),

    OPERATOR(16, "操作符"),

    MEASURE_UNIT(17, "计量单位"),

    MONEY_UNIT(18, "计量单位");

    private int value;

    private String name;

    LatexTextEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static LatexTextEnum valueOf(int value) {
        switch (value) {
            case 1:
                return LatexTextEnum.GENERAL;
            case 2:
                return LatexTextEnum.PLUS_MINUS_EXPRESSION;
            case 3:
                return LatexTextEnum.PLUS_MINUS_EQUATION;
            case 4:
                return LatexTextEnum.PLUS_MINUS_INEQUALITY;
            case 5:
                return LatexTextEnum.TIMES_DIVISION_EXPRESSION;
            case 6:
                return LatexTextEnum.TIMES_DIVISION_EQUATION;
            case 7:
                return LatexTextEnum.TIMES_DIVISION_INEQUALITY;
            case 8:
                return LatexTextEnum.ARITHMETIC_OPERATIONS_EXPRESSION;
            case 9:
                return LatexTextEnum.ARITHMETIC_OPERATIONS_EQUATION;
            case 10:
                return LatexTextEnum.ARITHMETIC_OPERATIONS_INEQUALITY;
            //case 11:
            //    return LatexTextEnum.ARITHMETIC_OPERATIONS_COMPARISON;
            //case 12 : return LatexTextEnum.FRACTION;
            //case 13 : return LatexTextEnum.RADICAL_NUMBER;
            //case 14:
            //    return LatexTextEnum.LOOP_DECIMAL;
            //case 15:
            //    return LatexTextEnum.SCIENCE_NOTATION;
            case 16:
                return LatexTextEnum.OPERATOR;
            case 17:
                return LatexTextEnum.MEASURE_UNIT;
            case 18:
                return LatexTextEnum.MONEY_UNIT;
            default:
                return null;
        }
    }
}
